package com.example.dao;

import com.example.entity.HealthycepingInfo;
import com.example.entity.SigninusersInfo;
import com.example.vo.HealthycepingInfoVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

@Repository
public interface HealthycepingInfoDao extends Mapper<HealthycepingInfo> {
    List<HealthycepingInfoVo> findByCepingresults(@Param("cepingresults") String cepingresults);
	List<HealthycepingInfoVo> findByCepingresultslist2(@Param("cepingresults") String cepingresults,@Param("username") String username);
        
	//xiugaimimazy
    int checkRepeat(@Param("column") String column, @Param("value") String value, @Param("id") Long id);
    
    Integer count();
	
	@Select("select * from healthyceping_info where username = #{username}")
    HealthycepingInfo selectByUsername(String username);
	
	@Select("SELECT * FROM healthyceping_info order by id")
    List<Map<String, Object>> daochuexcel();
	
	@Select("SELECT xxdiquziduanxxxx,count(id) as hsggs FROM healthyceping_info  group by xxdiquziduanxxxx")
    List<Map<String,String>> findByDiqu();
	
	
	
	@Select("SELECT distinct(cepingresults) as aa,count(id) as bb FROM healthyceping_info group by cepingresults order by id")
List<Map<String, Object>> healthyceping_tj_cepingresults();

	
	
    
	
	
	
	//wexixinxzhuaxnyoxng
	
	@Select("select * from healthyceping_info where username = #{username}")
    List<HealthycepingInfo> findByusername(SigninusersInfo signinusersInfo);
    

}
